import vueRequest from "@/network/request.js";

//获取页面列表数据
export function getList(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/getList/",
    data
  });
}

//添加信息
export function addNews(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/add/",
    data
  });
}

//删除信息
export function deleteInfo(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/deleteInfo/",
    data
  });
}

//修改信息

export function editInfo(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/editInfo/",
    data
  });
}

//添加一级分类
export function addFirstCategory(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/addFirstCategory/",
    data
  });
}

//获取分类信息
export function getCategory(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/getCategory/ ",
    data
  });
}

//删除分类
export function deleteCategory(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/deleteCategory/",
    data
  });
}

//修改分类信息
export function editCategory(data) {
  return vueRequest.request({
    method: "post",
    url: "/news/editCategory/",
    data
  });
}
